-- GENERATED SPELL FOR [Archbishop Landgren] --


function spell0_29542(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(60453,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29542', 1500, 1)
end

function spell1_29542(pUnit, Event) --@Mind Sear,n/a--
pUnit:FullCastSpellOnTarget(60440,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29542', 5000, 1)
end

function spell2_29542(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(60446,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29542', 18000, 1)
end

function spell3_29542(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(60449,pUnit)
pUnit:RegisterEvent('Sorts_29542', 1500, 1)
end

function Sorts_29542(pUnit, Event)
local choix_sorts_29542 = math.random(0, 3)
if choix_sorts_29542 == 0 then
pUnit:RegisterEvent('spell0_29542', 1, 1)
end
if choix_sorts_29542 == 1 then
pUnit:RegisterEvent('spell1_29542', 1, 1)
end
if choix_sorts_29542 == 2 then
pUnit:RegisterEvent('spell2_29542', 1, 1)
end
if choix_sorts_29542 == 3 then
pUnit:RegisterEvent('spell3_29542', 1, 1)
end
end

function mob29542_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29542', math.random(1500, 3000), 1)
end

function mob29542_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29542_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29542_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29542, 1, 'mob29542_Action')
RegisterUnitEvent(29542, 2, 'mob29542_Leave')
RegisterUnitEvent(29542, 3, 'mob29542_Kill')
RegisterUnitEvent(29542, 4, 'mob29542_Die')
